package wangwenjun.phase1.ticketwindow;

import lombok.extern.slf4j.Slf4j;
import util.ThreadUtil;

/**
 * @author ChangLiang
 * @date 2020/5/29
 */
@Slf4j
public class TicketWindowV1Runnable implements Runnable {

    /**
     * 不做static修饰
     */
    private int index = 1;

    private final static int MAX = 50;

    @Override
    public void run() {
        while (index <= MAX) {
            log.info(Thread.currentThread() + "的号码是：" + (index++));
            ThreadUtil.sleepForMilliSeconds(100);
        }
    }
}
